//vue构造函数,执行了_init函数
import { initMixin } from "./init";
import { stateMixin } from "./state";
import { renderMixin } from "./render";
import { eventsMixin } from "./events";
import { lifecycleMixin } from "./lifecycle";
import { warn } from "../util/index";

function Vue(options) {
  if (process.env.NODE_ENV !== "production" && !(this instanceof Vue)) {
    warn("Vue is a constructor and should be called with the `new` keyword");
  }
  this._init(options);
}

initMixin(Vue); //为vue原型绑定_init方法(内部方法)
stateMixin(Vue); //事态相关的api $data $props $set $delete $watch 定义原型上跟数据相关的属性方法
eventsMixin(Vue); //事件相关api  $on $once $off $emit  定义原型上跟事件相关的属性方法
lifecycleMixin(Vue); //生命周期相关 _update $destory 定义原型上跟生命周期相关的方法
renderMixin(Vue); //渲染api _render $nextTick 定义渲染相关的函数

export default Vue;
